home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectShow_WinXP / VMR / VMRMix / VMRMix.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-10  |  2.8 KB  |  91 lines

  1. //------------------------------------------------------------------------------
  2. // File: VMRMix.cpp
  3. //
  4. // Desc: DirectShow sample code
  5. //       Implementation of CVMRMixApp
  6. //
  7. // Copyright (c) 2000-2001 Microsoft Corporation.  All rights reserved.
  8. //------------------------------------------------------------------------------
  9.  
  10. #include "stdafx.h"
  11. #include "VMRMix.h"
  12. #include "VMRMixDlg.h"
  13.  
  14. #ifdef _DEBUG
  15. #define new DEBUG_NEW
  16. #undef THIS_FILE
  17. static char THIS_FILE[] = __FILE__;
  18. #endif
  19.  
  20. extern BOOL VerifyVMR(void);
  21.  
  22.  
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CVMRMixApp
  25.  
  26. BEGIN_MESSAGE_MAP(CVMRMixApp, CWinApp)
  27.     //{{AFX_MSG_MAP(CVMRMixApp)
  28.         // NOTE - the ClassWizard will add and remove mapping macros here.
  29.         //    DO NOT EDIT what you see in these blocks of generated code!
  30.     //}}AFX_MSG
  31.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  32. END_MESSAGE_MAP()
  33.  
  34. /////////////////////////////////////////////////////////////////////////////
  35. // CVMRMixApp construction
  36.  
  37. CVMRMixApp::CVMRMixApp()
  38. {
  39.     // TODO: add construction code here,
  40.     // Place all significant initialization in InitInstance
  41. }
  42.  
  43. /////////////////////////////////////////////////////////////////////////////
  44. // The one and only CVMRMixApp object
  45.  
  46. CVMRMixApp theApp;
  47.  
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CVMRMixApp initialization
  50.  
  51. BOOL CVMRMixApp::InitInstance()
  52. {
  53.     // Standard initialization
  54.     // If you are not using these features and wish to reduce the size
  55.     //  of your final executable, you should remove from the following
  56.     //  the specific initialization routines you do not need.
  57.  
  58.     // In MFC 5.0, Enable3dControls and Enable3dControlsStatic are obsolete because
  59.     // their functionality is incorporated into Microsoft's 32-bit operating systems.
  60. #if (_MSC_VER <= 1200)
  61. #ifdef _AFXDLL
  62.     Enable3dControls();         // Call this when using MFC in a shared DLL
  63. #else
  64.     Enable3dControlsStatic();   // Call this when linking to MFC statically
  65. #endif
  66. #endif
  67.  
  68.     // Verify that the Video Mixing Renderer is present (requires Windows XP).
  69.     // Otherwise, this sample cannot continue.
  70.     if (!VerifyVMR())
  71.        return FALSE;
  72.  
  73.     CVMRMixDlg dlg;
  74.     m_pMainWnd = &dlg;
  75.     int nResponse = dlg.DoModal();
  76.     if (nResponse == IDOK)
  77.     {
  78.         // TODO: Place code here to handle when the dialog is
  79.         //  dismissed with OK
  80.     }
  81.     else if (nResponse == IDCANCEL)
  82.     {
  83.         // TODO: Place code here to handle when the dialog is
  84.         //  dismissed with Cancel
  85.     }
  86.  
  87.     // Since the dialog has been closed, return FALSE so that we exit the
  88.     //  application, rather than start the application's message pump.
  89.     return FALSE;
  90. }
  91.